package io.renren.modules.webapi.service;

import com.baomidou.mybatisplus.service.IService;
import io.renren.common.utils.PageUtils;
import io.renren.modules.file.entity.FileChunkEntity;
import io.renren.modules.webapi.entity.InnerFileEntity;

import java.util.Map;
import java.util.List;

/**
 * 内网文件服务
 *
 * @author ygg
 * @date 2021-09-29 16:26:01
 */
public interface InnerFileService extends IService<InnerFileEntity> {

    PageUtils queryPage(Map<String, Object> params);

    List<InnerFileEntity> queryList(Map<String, Object> params);

    InnerFileEntity queryEntity(Map<String, Object> params);

    InnerFileEntity save(Map<String, Object> params);

    void save(InnerFileEntity entity);

    void update(InnerFileEntity entity);

    void deleteBatch(Long[] Ids);

    void deleteByID(Long Id);

    void createDir(Long id,String path);

    String getParentDir(Long id,String path);

    /**
     * 处理GET请求（携带文件流）
     * @param chunk 文件块
     * @param params 响应
     * @return 文件块
     */
    String chunkUploadByteBuffer(FileChunkEntity chunk, String filePath);
}

